<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<title>后台管理中心</title>
<link href="/courses/public/admin/css/reset.css" rel="stylesheet" type="text/css">
<link href="/courses/public/admin/css/zh-cn-system.css" rel="stylesheet" type="text/css">
<link href="/courses/public/admin/css/table_form.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles1.css" title="styles1" media="screen" disabled="">
	<link rel="alternate stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles2.css" title="styles2" media="screen" disabled="">
	<link rel="alternate stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles3.css" title="styles3" media="screen" disabled="">
    <link rel="alternate stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles4.css" title="styles4" media="screen">
<script language="javascript" type="text/javascript" src="/courses/public/admin/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="/courses/public/admin/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="/courses/public/admin/js/styleswitch.js"></script>
<script type="text/javascript">
	window.focus();
	var pc_hash = 'aYfbYo';
			window.onload = function(){
		var html_a = document.getElementsByTagName('a');
		var num = html_a.length;
		for(var i=0;i<num;i++) {
			var href = html_a[i].href;
			if(href && href.indexOf('javascript:') == -1) {
				if(href.indexOf('?') != -1) {
					html_a[i].href = href+'&pc_hash='+pc_hash;
				} else {
					html_a[i].href = href+'?pc_hash='+pc_hash;
				}
			}
		}

		var html_form = document.forms;
		var num = html_form.length;
		for(var i=0;i<num;i++) {
			var newNode = document.createElement("input");
			newNode.name = 'pc_hash';
			newNode.type = 'hidden';
			newNode.value = pc_hash;
			html_form[i].appendChild(newNode);
		}
	}
</script>
</head>
<body>
<div class="subnav">
    <div class="content-menu ib-a blue line-x">
    <a class="add fb" href="javascript:window.top.art.dialog({id:'add',iframe:'__URL__/member_add', title:'添加会员', width:'700', height:'500', lock:true}, function(){var d = window.top.art.dialog({id:'add'}).data.iframe;var form = d.document.getElementById('dosubmit');form.click();return false;}, function(){window.top.art.dialog({id:'add'}).close()});void(0);"><em>添加会员</em></a></div>
</div>
<style type="text/css">
	html{_overflow-y:scroll;}
</style><div class="pad-lr-10">
<form name="searchform" action="__URL__/search_member" method="get">
<table width="100%" cellspacing="0" class="search-form">
    <tbody>
		<tr>
		<td>
		<div class="explain-col">
				<select name="userstyle"><option value="" selected="">会员类型</option>
					<option value="3">一般会员</option>
					<option value="2">一般管理员</option>
					<option value="1">超级管理员</option>
				</select>				
				<select name="type">
					<option value="userid">用户ID</option>
					<option value="username">用户名</option>
					<option value="userTrueName">真实姓名</option>
				</select>
				
				<input name="keyword" type="text" value="" class="input-text">
				<input type="submit" name="search" class="button" value="搜索">
	</div>
		</td>
		</tr>
    </tbody>
</table>
</form>

<form name="myform" action="__URL__/member_delete" method="post" onsubmit="checkuid();return false;">
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th align="left" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('userid[]');"></th>
			<th align="left"></th>
			<th align="left" width="100">用户ID</th>
			<th align="left" width="100">用户名</th>
			<th align="left" width="150">真实姓名</th>
			<th align="left" width="100">邮箱</th>
			<th align="left" width="150">最后登录IP</th>
			<th align="left" width="200">最后登录时间</th>
			<th align="left" width="100">会员类型</th>
			<th align="left" width="50">操作</th>
		</tr>
	</thead>
<tbody>
	<volist name="array" id="memberData">
	    <tr>
			<td align="left"><input type="checkbox" value="{[$memberData.userid]}" name="userid[]"></td>
			<td align="left"></td>
			<td align="left">{[$memberData.userid]}</td>
			<td align="left">{[$memberData.username]}</td>
			<td align="left"><img src="/courses/public/admin/images/member/nophoto.gif" height="18" width="18" onerror="this.src='/courses/public/admin/images/member/nophoto.gif'">
				{[$memberData.userTrueName]}<a href="javascript:member_infomation({[$memberData.userid]}, '0', '')"><img src="/courses/public/admin/images/admin_img/detail.png"></a></td>
			<td align="left">{[$memberData.userEmail]}</td>
			<td align="left">{[$memberData.userLoginIp]}</td>
			<td align="left">{[$memberData.userLoginTime]}</td>	
			<td align="left">
				<if condition="($memberData.userstyle eq 3) ">一般会员
				<elseif condition="($memberData.userstyle eq 2)" />一般管理员
				<else />超级管理员
				</if>
			</td>
			<td align="left">
				<a href="javascript:edit({[$memberData.userid]}, '{[$memberData.username]}')">[修改]</a>
			</td>
	    </tr>
	</volist>
</tbody>
</table>

<div class="btn">
<label for="check_box">全选/取消</label>
<input type="submit" class="button" name="dosubmit" value="删除" onclick="return confirm('您确定要删除吗？')">
</div>
</div>
<div id="pages">
<a class="a1">{[$count]}</a> 
<php>
if($currentPage == 1){
</php>
	<a class="a1">上一页</a> 
<php>
}else{
</php>
<a href="__URL__/right_message?page={[$upPage]}" class="a1">上一页</a> 
<php>
}
for($i = 1;$i <= $page;$i++){
	if($currentPage == $i){
		echo " <span>$i</span>";
	}
	else{
		echo " <a href='__URL__/right_message?page=$i'>$i</a>";
	}
}
</php>
<php>
if($currentPage == $page){
	</php>
		<a class="a1">下一页</a> 
	<php>
}else{
	</php>
	 <a href="__URL__/right_message?page={[$downPage]}" class="a1">下一页</a>
	<php>
}
</php>
</div>

<input name="pc_hash" type="hidden" value="aYfbYo"></form>
</div>
<script type="text/javascript">
<!--
function edit(id, name) {
	window.top.art.dialog({id:'edit'}).close();
	window.top.art.dialog({title:'修改会员《'+name+'》',id:'edit',iframe:'__URL__/member_update?userid='+id,width:'700',height:'500'}, function(){var d = window.top.art.dialog({id:'edit'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'edit'}).close()});
}
function move() {
	var ids='';
	$("input[name='userid[]']:checked").each(function(i, n){
		ids += $(n).val() + ',';
	});
	if(ids=='') {
		window.top.art.dialog({content:'请选择会员',lock:true,width:'200',height:'50',time:1.5},function(){});
		return false;
	}
	window.top.art.dialog({id:'move'}).close();
	window.top.art.dialog({title:'移动会员',id:'move',iframe:'?m=member&c=member&a=move&ids='+ids,width:'700',height:'500'}, function(){var d = window.top.art.dialog({id:'move'}).data.iframe;d.$('#dosubmit').click();return false;}, function(){window.top.art.dialog({id:'move'}).close()});
}

function checkuid() {
	var ids='';
	$("input[name='userid[]']:checked").each(function(i, n){
		ids += $(n).val() + ',';
	});
	if(ids=='') {
		window.top.art.dialog({content:'请选择会员',lock:true,width:'200',height:'50',time:1.5},function(){});
		return false;
	} else {
		myform.submit();
	}
}

function member_infomation(userid, modelid, name) {
	window.top.art.dialog({id:'modelinfo'}).close();
	window.top.art.dialog({title:'个人信息',id:'modelinfo',iframe:'__URL__/member_detail?userid='+userid,width:'700',height:'500'}, function(){var d = window.top.art.dialog({id:'modelinfo'}).data.iframe;d.document.getElementById('dosubmit').click();return false;}, function(){window.top.art.dialog({id:'modelinfo'}).close()});
}

//-->
</script>

</body></html>